<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>BBS</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/res/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/res/css/global.css}">
</head>
<body>
<!-- 引入header -->
<div th:replace="common/header::bbsHeader"></div>
<!-- 引入顶部工具条 -->
<div th:replace="common/column::bbsColumn(value = 'index')"></div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
            <div class="fly-panel">
                <div class="fly-panel-title fly-filter">
                    <a>置顶</a>
                    <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin"
                       style="color: #FF5722;">去签到</a>
                </div>
                <ul class="fly-list">
                    <li th:each="stickJie : ${jieListIfStick}">
                        <a th:href="@{'/user/'+${stickJie.creator.id}}" class="fly-avatar">
                            <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"
                                 alt="贤心">
                        </a>
                        <h2>
                            <a class="layui-badge" th:text="${stickJie.getColumn(stickJie.columnId)}">动态</a>
                            <a th:href="@{'/jie/'+${stickJie.id}}" th:text="${stickJie.title}">基于 layui 的极简社区页面模版</a>
                        </h2>
                        <div class="fly-list-info">
                            <a href="/user/home" link>
                                <cite th:text="${stickJie.creator == null ? '已注销用户' : stickJie.creator.name}">贤心</cite>
                                <i class="iconfont icon-renzheng" th:if="${stickJie.creator != null}" th:title="${'认证信息：' + stickJie.creator.name}"></i>
                                <i class="layui-badge fly-badge-vip" th:if="${stickJie.creator.userGrade != null}" th:text="${stickJie.creator.userGrade.gradeName}">VIP3</i>
                            </a>
                            <span th:text="${#dates.format(stickJie.gmtCreate,'yyyy-MM-dd HH:mm')}">刚刚</span>

<!--                            <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> 60</span>-->
                            <span class="layui-badge fly-badge-accept layui-hide-xs" th:if="${stickJie.isClosed}">已结</span>
                            <span class="fly-list-nums">
                <i class="iconfont icon-pinglun1" title="回答"></i> [[${stickJie.commentCount}]]
              </span>
                        </div>
                        <div class="fly-list-badge">
                            <span class="layui-badge layui-bg-black" th:if="${stickJie.isSticky}">置顶</span>
                            <span class="layui-badge layui-bg-red" th:if="${stickJie.isBoutique}">精帖</span>
                        </div>
                    </li>
                </ul>
            </div>

            <div class="fly-panel" style="margin-bottom: 0;">
                <!-- 引入分类filter -->
                <div th:replace="common/filter::bbsFilter"></div>

                <ul class="fly-list">
                    <li th:each="jie : ${jieList}">
                        <a th:href="@{'/user/'+${jie.creator.id}}" class="fly-avatar">
                            <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"
                                 alt="贤心">
                        </a>
                        <h2>
                            <a class="layui-badge" th:text="${jie.getColumn(jie.columnId)}">动态</a>
                            <a th:href="@{'/jie/'+${jie.id}}" th:text="${jie.title}"></a>
                        </h2>
                        <div class="fly-list-info">
                            <a href="user/home" link>
                                <cite th:text="${jie.creator== null ? '已删除用户': jie.creator.name}">贤心</cite>
                                <i class="iconfont icon-renzheng" th:if="${jie.creator.userGrade != null}" th:title="${'认证信息：'+jie.creator.name}"></i>
                                <i class="layui-badge fly-badge-vip" th:if="${jie.creator.userGrade != null}" th:text="${jie.creator.userGrade.gradeName}">VIP3</i>
                            </a>
                            <span th:text="${#dates.format(jie.gmtCreate, 'yyyy-MM-dd HH:mm')}"></span>

<!--                            <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> 60</span>-->
                            <span class="layui-badge fly-badge-accept layui-hide-xs" th:if="${jie.isClosed}">已结</span>
                            <span class="fly-list-nums">
                <i class="iconfont icon-pinglun1" title="回答"></i> [[${jie.commentCount}]]
              </span>
                        </div>
                        <div class="fly-list-badge">
                            <span class="layui-badge layui-bg-black" th:if="${jie.isSticky}">置顶</span>
                            <span class="layui-badge layui-bg-red" th:if="${jie.isBoutique}">精帖</span>
                        </div>
                    </li>
                </ul>
                <div style="text-align: center">
                    <div class="laypage-main">
                        <a href="/jie/all/page/2" class="laypage-next">更多求解</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="fly-panel">
                <h3 class="fly-panel-title">温馨通道</h3>
                <ul class="fly-panel-main fly-list-static passagewayPar">
                </ul>
            </div>

            <div class="fly-panel fly-signin">
                <div class="fly-panel-title">
                    签到
                    <i class="fly-mid"></i>
                    <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
                    <i class="fly-mid"></i>
                    <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span class="layui-badge-dot"></span></a>
                    <span class="fly-signin-days">已连续签到<cite>16</cite>天</span>
                </div>
                <div class="fly-panel-main fly-signin-main">
                    <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button>
                    <span>可获得<cite>5</cite>飞吻</span>

                    <!-- 已签到状态 -->
<!--                    <button class="layui-btn layui-btn-disabled">今日已签到</button>-->
<!--                    <span>获得了<cite>20</cite>飞吻</span>-->
                </div>
            </div>

            <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
              <h3 class="fly-panel-title">回贴周榜</h3>
              <dl>
<!--                <i class="layui-icon fly-loading">&#xe63d;</i>-->
                <dd>
                  <a href="user/home.html">
                    <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                  </a>
                </dd>
                <dd>
                  <a href="user/home.html">
                    <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                  </a>
                </dd>
                <dd>
                  <a href="user/home.html">
                    <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                  </a>
                </dd>
                <dd>
                  <a href="user/home.html">
                    <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                  </a>
                </dd>
                <dd>
                  <a href="user/home.html">
                    <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                  </a>
                </dd>
              </dl>
            </div>

            <dl class="fly-panel fly-list-one">
              <dt class="fly-panel-title">本周热议</dt>
              <dd>
                <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                <span><i class="iconfont icon-pinglun1"></i> 16</span>
              </dd>

              <!-- 无数据时 -->
              <!--
              <div class="fly-none">没有相关数据</div>
              -->
            </dl>

            <div class="fly-panel">
                <div class="fly-panel-title">
                    这里可作为广告区域
                </div>
                <div class="fly-panel-main">
                    <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu"
                       time-limit="2017.09.25-2099.01.01" style="background-color: #5FB878;">LayIM 3.0 - layui 旗舰之作</a>
                </div>
            </div>
            <!-- 引入友情链接 -->
            <div th:replace="common/link::bbsLink"></div>
        </div>
    </div>
</div>

<!-- 引入footer -->
<div th:replace="common/footer::bbsFooter"></div>

<script th:src="@{/res/layui/layui.js}"></script>
<script th:src="@{/res/customize/link/link.js}"></script>
<script>
    layui.cache.page = '';
    layui.cache.user = {
        username: '游客'
        , uid: -1
        , avatar: '../res/images/avatar/00.jpg'
        , experience: 83
        , sex: '男'
    };
    layui.config({
        version: "3.0.0"
        , base: '../res/mods/' //这里实际使用时，建议改成绝对路径
    }).extend({
        fly: 'index'
    }).use('fly');
</script>

<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cspan id='cnzz_stat_icon_30088308'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/c.php%3Fid%3D30088308' type='text/javascript'%3E%3C/script%3E"));</script>

</body>
</html>